/*
 * OjosPez.cpp
 *
 *  Created on: 04/10/2013
 *      Author: ezequiel
 */

#include "OjosPez.h"


void changeObjectColor(GLuint handle, float r, float g, float b)
 {
     glm::vec3 diffuse_reflectivity = glm::vec3( r, g, b );

     GLuint location_diffuse_reflectivity = glGetUniformLocation( handle, "Kd");
     if( location_diffuse_reflectivity >= 0 )
 	{
 		glUniform3fv( location_diffuse_reflectivity, 1, &diffuse_reflectivity[0]);
 	}
}

OjosPez::OjosPez() {
	this->formaOjo = new Esfera(0.15);
}

OjosPez::~OjosPez() {
	this->formaOjo->~Esfera();
	delete this->formaOjo;
}

void OjosPez::render(GLuint handle, glm::mat4* matModelo) {
	glm::mat4 matrizOjo = *matModelo;
	changeObjectColor(handle, 1,1,1);
	this->formaOjo->render(handle, &matrizOjo );
}

void OjosPez::render(GLuint handle) {
}

void OjosPez::setCam(Camara* cam, glm::mat4 pr) {
	this->formaOjo->setCam(cam, pr);
}
